<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.9.1"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>RetroSnake: SnakerMap Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">RetroSnake
   &#160;<span id="projectnumber">0.7.23</span>
   </div>
   <div id="projectbrief">Try to write a snake.io in cmd.</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.9.1 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(document).ready(function(){initNavTree('class_snaker_map.html',''); initResizable(); });
/* @license-end */
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pub-attribs">Public Attributes</a> &#124;
<a href="class_snaker_map-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">SnakerMap Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>地图  
 <a href="class_snaker_map.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="_snaker_map_8h_source.html">SnakerMap.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a0381749c300a65ecd5f405591bdea864"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_snaker_chunk.html">SnakerChunk</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_snaker_map.html#a0381749c300a65ecd5f405591bdea864">mapOrigin</a> ()</td></tr>
<tr class="memdesc:a0381749c300a65ecd5f405591bdea864"><td class="mdescLeft">&#160;</td><td class="mdescRight">获得原点chunk  <a href="class_snaker_map.html#a0381749c300a65ecd5f405591bdea864">More...</a><br /></td></tr>
<tr class="separator:a0381749c300a65ecd5f405591bdea864"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4c46cc30babee0831555ffcba6d1aee0"><td class="memItemLeft" align="right" valign="top">bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_snaker_map.html#a4c46cc30babee0831555ffcba6d1aee0">hasChunk</a> (int cx, int cy)</td></tr>
<tr class="memdesc:a4c46cc30babee0831555ffcba6d1aee0"><td class="mdescLeft">&#160;</td><td class="mdescRight">判断chunk坐标有无已生成的chunk  <a href="class_snaker_map.html#a4c46cc30babee0831555ffcba6d1aee0">More...</a><br /></td></tr>
<tr class="separator:a4c46cc30babee0831555ffcba6d1aee0"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:affd21f9925c0354466b342349d3bc158"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_snaker_chunk.html">SnakerChunk</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_snaker_map.html#affd21f9925c0354466b342349d3bc158">FindChunk</a> (int cx, int cy)</td></tr>
<tr class="memdesc:affd21f9925c0354466b342349d3bc158"><td class="mdescLeft">&#160;</td><td class="mdescRight">根据chunk坐标获得chunk  <a href="class_snaker_map.html#affd21f9925c0354466b342349d3bc158">More...</a><br /></td></tr>
<tr class="separator:affd21f9925c0354466b342349d3bc158"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af22a31e7eb537e8eea9aaa214915bbc4"><td class="memItemLeft" align="right" valign="top"><a id="af22a31e7eb537e8eea9aaa214915bbc4"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_snaker_map.html#af22a31e7eb537e8eea9aaa214915bbc4">inChunk</a> (int x, int y, <a class="el" href="class_snaker_chunk.html">SnakerChunk</a> *chk)</td></tr>
<tr class="memdesc:af22a31e7eb537e8eea9aaa214915bbc4"><td class="mdescLeft">&#160;</td><td class="mdescRight">判断给定点是否在给定chunk中 <br /></td></tr>
<tr class="separator:af22a31e7eb537e8eea9aaa214915bbc4"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0f5b569e65aa5c0daecb694102be6b3c"><td class="memItemLeft" align="right" valign="top"><a class="el" href="class_snaker_chunk.html">SnakerChunk</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_snaker_map.html#a0f5b569e65aa5c0daecb694102be6b3c">GetChunk</a> (int x, int y)</td></tr>
<tr class="memdesc:a0f5b569e65aa5c0daecb694102be6b3c"><td class="mdescLeft">&#160;</td><td class="mdescRight">根据给定点坐标获得chunk  <a href="class_snaker_map.html#a0f5b569e65aa5c0daecb694102be6b3c">More...</a><br /></td></tr>
<tr class="separator:a0f5b569e65aa5c0daecb694102be6b3c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a85ad63004db7b7bb31161860f8481859"><td class="memItemLeft" align="right" valign="top"><a id="a85ad63004db7b7bb31161860f8481859"></a>
<a class="el" href="class_snaker_fruit.html">SnakerFruit</a> *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_snaker_map.html#a85ad63004db7b7bb31161860f8481859">GetFruit</a> (<a class="el" href="class_snaker_chunk.html">SnakerChunk</a> *, int)</td></tr>
<tr class="memdesc:a85ad63004db7b7bb31161860f8481859"><td class="mdescLeft">&#160;</td><td class="mdescRight">得到给定点上的水果对象 <br /></td></tr>
<tr class="separator:a85ad63004db7b7bb31161860f8481859"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acf96b3c728e180b51d5c635809d2a1fb"><td class="memItemLeft" align="right" valign="top">vector&lt; <a class="el" href="class_snaker_fruit.html">SnakerFruit</a> * &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_snaker_map.html#acf96b3c728e180b51d5c635809d2a1fb">ListFruit</a> (<a class="el" href="class_snaker_chunk.html">SnakerChunk</a> *chk)</td></tr>
<tr class="memdesc:acf96b3c728e180b51d5c635809d2a1fb"><td class="mdescLeft">&#160;</td><td class="mdescRight">列出指定chunk中的所有水果  <a href="class_snaker_map.html#acf96b3c728e180b51d5c635809d2a1fb">More...</a><br /></td></tr>
<tr class="separator:acf96b3c728e180b51d5c635809d2a1fb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a61999b90581081151fd2effd55a49f2c"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_snaker_map.html#a61999b90581081151fd2effd55a49f2c">GetTerrainType</a> (int x, int y, <a class="el" href="class_snaker_chunk.html">SnakerChunk</a> *chk)</td></tr>
<tr class="memdesc:a61999b90581081151fd2effd55a49f2c"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取给定点坐标在指定chunk的地形  <a href="class_snaker_map.html#a61999b90581081151fd2effd55a49f2c">More...</a><br /></td></tr>
<tr class="separator:a61999b90581081151fd2effd55a49f2c"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae4c6d8cafd8fc93c5ee305016aa4530a"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_snaker_map.html#ae4c6d8cafd8fc93c5ee305016aa4530a">GetTerrainType</a> (int x, int y)</td></tr>
<tr class="memdesc:ae4c6d8cafd8fc93c5ee305016aa4530a"><td class="mdescLeft">&#160;</td><td class="mdescRight">获取给定点坐标的地形  <a href="class_snaker_map.html#ae4c6d8cafd8fc93c5ee305016aa4530a">More...</a><br /></td></tr>
<tr class="separator:ae4c6d8cafd8fc93c5ee305016aa4530a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5c19df757f8f3e44eb64279a98775572"><td class="memItemLeft" align="right" valign="top"><a id="a5c19df757f8f3e44eb64279a98775572"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_snaker_map.html#a5c19df757f8f3e44eb64279a98775572">GenerateMapOrigin</a> ()</td></tr>
<tr class="memdesc:a5c19df757f8f3e44eb64279a98775572"><td class="mdescLeft">&#160;</td><td class="mdescRight">生成原点区块 <br /></td></tr>
<tr class="separator:a5c19df757f8f3e44eb64279a98775572"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adc584396440ab16fa8c69ba2ec45c03a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_snaker_map.html#adc584396440ab16fa8c69ba2ec45c03a">ExpandMap</a> (<a class="el" href="class_snaker_chunk.html">SnakerChunk</a> *chk, bool EXP_FLG=true)</td></tr>
<tr class="memdesc:adc584396440ab16fa8c69ba2ec45c03a"><td class="mdescLeft">&#160;</td><td class="mdescRight">从给定区块向四周扩展生成新区块  <a href="class_snaker_map.html#adc584396440ab16fa8c69ba2ec45c03a">More...</a><br /></td></tr>
<tr class="separator:adc584396440ab16fa8c69ba2ec45c03a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a678f15790e948cffda7e662a08016078"><td class="memItemLeft" align="right" valign="top"><a id="a678f15790e948cffda7e662a08016078"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_snaker_map.html#a678f15790e948cffda7e662a08016078">AddFruit</a> (<a class="el" href="class_snaker_fruit.html">SnakerFruit</a> *fruit, int x, int y)</td></tr>
<tr class="memdesc:a678f15790e948cffda7e662a08016078"><td class="mdescLeft">&#160;</td><td class="mdescRight">根据给出的参数在指定位置生成水果 <br /></td></tr>
<tr class="separator:a678f15790e948cffda7e662a08016078"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae97130f1e3f8548daafa02eba90e4a5b"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_snaker_map.html#ae97130f1e3f8548daafa02eba90e4a5b">RemoveFruit</a> (int x, int y)</td></tr>
<tr class="memdesc:ae97130f1e3f8548daafa02eba90e4a5b"><td class="mdescLeft">&#160;</td><td class="mdescRight">移除指定位置的水果  <a href="class_snaker_map.html#ae97130f1e3f8548daafa02eba90e4a5b">More...</a><br /></td></tr>
<tr class="separator:ae97130f1e3f8548daafa02eba90e4a5b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa0cd6f6bc7945b0038571779f5999237"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_snaker_map.html#aa0cd6f6bc7945b0038571779f5999237">GenerateFruit</a> (<a class="el" href="class_snaker_chunk.html">SnakerChunk</a> *chk, <a class="el" href="class_snaker_fruit.html">SnakerFruit</a> *fruit)</td></tr>
<tr class="memdesc:aa0cd6f6bc7945b0038571779f5999237"><td class="mdescLeft">&#160;</td><td class="mdescRight">在指定区块随机生成水果  <a href="class_snaker_map.html#aa0cd6f6bc7945b0038571779f5999237">More...</a><br /></td></tr>
<tr class="separator:aa0cd6f6bc7945b0038571779f5999237"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5874c8bc3c074f192e23c21aac314851"><td class="memItemLeft" align="right" valign="top"><a id="a5874c8bc3c074f192e23c21aac314851"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_snaker_map.html#a5874c8bc3c074f192e23c21aac314851">Init</a> ()</td></tr>
<tr class="memdesc:a5874c8bc3c074f192e23c21aac314851"><td class="mdescLeft">&#160;</td><td class="mdescRight">初始化函数 <br /></td></tr>
<tr class="separator:a5874c8bc3c074f192e23c21aac314851"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4e0bbcd763e4d08448caf36f749cc607"><td class="memItemLeft" align="right" valign="top">string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_snaker_map.html#a4e0bbcd763e4d08448caf36f749cc607">DisplayChunk</a> (<a class="el" href="class_snaker_chunk.html">SnakerChunk</a> *chk)</td></tr>
<tr class="memdesc:a4e0bbcd763e4d08448caf36f749cc607"><td class="mdescLeft">&#160;</td><td class="mdescRight">将指定区块以字符串形式打印  <a href="class_snaker_map.html#a4e0bbcd763e4d08448caf36f749cc607">More...</a><br /></td></tr>
<tr class="separator:a4e0bbcd763e4d08448caf36f749cc607"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3cbd1a2963522b676ae61ab20d2ef852"><td class="memItemLeft" align="right" valign="top">char **&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="class_snaker_map.html#a3cbd1a2963522b676ae61ab20d2ef852">DisplayChunkC</a> (<a class="el" href="class_snaker_chunk.html">SnakerChunk</a> *chk)</td></tr>
<tr class="memdesc:a3cbd1a2963522b676ae61ab20d2ef852"><td class="mdescLeft">&#160;</td><td class="mdescRight">将指定区块打印出来  <a href="class_snaker_map.html#a3cbd1a2963522b676ae61ab20d2ef852">More...</a><br /></td></tr>
<tr class="separator:a3cbd1a2963522b676ae61ab20d2ef852"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-attribs"></a>
Public Attributes</h2></td></tr>
<tr class="memitem:abae71aebde2e5b3d1b192c8d02147b27"><td class="memItemLeft" align="right" valign="top"><a id="abae71aebde2e5b3d1b192c8d02147b27"></a>
map&lt; pair&lt; int, int &gt;, <a class="el" href="class_snaker_chunk.html">SnakerChunk</a> * &gt;&#160;</td><td class="memItemRight" valign="bottom"><b>chunkMap</b></td></tr>
<tr class="separator:abae71aebde2e5b3d1b192c8d02147b27"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>地图 </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">chunkMap</td><td>将chunk与其绝对位置挂钩</td></tr>
  </table>
  </dd>
</dl>
<p>用红黑树储存chunk标记 </p>
</div><h2 class="groupheader">Member Function Documentation</h2>
<a id="a4e0bbcd763e4d08448caf36f749cc607"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4e0bbcd763e4d08448caf36f749cc607">&#9670;&nbsp;</a></span>DisplayChunk()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">string SnakerMap::DisplayChunk </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_snaker_chunk.html">SnakerChunk</a> *&#160;</td>
          <td class="paramname"><em>chk</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>将指定区块以字符串形式打印 </p>
<p>用于调试 </p>

</div>
</div>
<a id="a3cbd1a2963522b676ae61ab20d2ef852"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a3cbd1a2963522b676ae61ab20d2ef852">&#9670;&nbsp;</a></span>DisplayChunkC()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">char ** SnakerMap::DisplayChunkC </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_snaker_chunk.html">SnakerChunk</a> *&#160;</td>
          <td class="paramname"><em>chk</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>将指定区块打印出来 </p>
<dl class="section return"><dt>Returns</dt><dd>存有区块外形的二维字符数组 </dd></dl>

</div>
</div>
<a id="adc584396440ab16fa8c69ba2ec45c03a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#adc584396440ab16fa8c69ba2ec45c03a">&#9670;&nbsp;</a></span>ExpandMap()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SnakerMap::ExpandMap </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_snaker_chunk.html">SnakerChunk</a> *&#160;</td>
          <td class="paramname"><em>chk</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">bool&#160;</td>
          <td class="paramname"><em>EXP_FLG</em> = <code>true</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>从给定区块向四周扩展生成新区块 </p>
<p>实际上是二层dfs </p>

</div>
</div>
<a id="affd21f9925c0354466b342349d3bc158"></a>
<h2 class="memtitle"><span class="permalink"><a href="#affd21f9925c0354466b342349d3bc158">&#9670;&nbsp;</a></span>FindChunk()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_snaker_chunk.html">SnakerChunk</a> * SnakerMap::FindChunk </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>cx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>cy</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>根据chunk坐标获得chunk </p>
<dl class="section return"><dt>Returns</dt><dd>已知宏观坐标的chunk </dd></dl>

</div>
</div>
<a id="aa0cd6f6bc7945b0038571779f5999237"></a>
<h2 class="memtitle"><span class="permalink"><a href="#aa0cd6f6bc7945b0038571779f5999237">&#9670;&nbsp;</a></span>GenerateFruit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SnakerMap::GenerateFruit </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_snaker_chunk.html">SnakerChunk</a> *&#160;</td>
          <td class="paramname"><em>chk</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_snaker_fruit.html">SnakerFruit</a> *&#160;</td>
          <td class="paramname"><em>fruit</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>在指定区块随机生成水果 </p>
<p>生成上限为区块边长除以3 </p>

</div>
</div>
<a id="a0f5b569e65aa5c0daecb694102be6b3c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0f5b569e65aa5c0daecb694102be6b3c">&#9670;&nbsp;</a></span>GetChunk()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_snaker_chunk.html">SnakerChunk</a> * SnakerMap::GetChunk </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>根据给定点坐标获得chunk </p>
<dl class="section return"><dt>Returns</dt><dd>已知微观坐标的chunk </dd></dl>

</div>
</div>
<a id="ae4c6d8cafd8fc93c5ee305016aa4530a"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae4c6d8cafd8fc93c5ee305016aa4530a">&#9670;&nbsp;</a></span>GetTerrainType() <span class="overload">[1/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int SnakerMap::GetTerrainType </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取给定点坐标的地形 </p>
<dl class="section return"><dt>Returns</dt><dd>0为墙壁<br  />
-1为地面<br  />
正整数为水果</dd></dl>
<p>会先寻找指定点所在chunk，如果有条件请在参数列表中给出寻找范围 </p>

</div>
</div>
<a id="a61999b90581081151fd2effd55a49f2c"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a61999b90581081151fd2effd55a49f2c">&#9670;&nbsp;</a></span>GetTerrainType() <span class="overload">[2/2]</span></h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int SnakerMap::GetTerrainType </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype"><a class="el" href="class_snaker_chunk.html">SnakerChunk</a> *&#160;</td>
          <td class="paramname"><em>chk</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获取给定点坐标在指定chunk的地形 </p>
<dl class="section return"><dt>Returns</dt><dd>0为墙壁<br  />
-1为地面<br  />
正整数为水果 </dd></dl>

</div>
</div>
<a id="a4c46cc30babee0831555ffcba6d1aee0"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a4c46cc30babee0831555ffcba6d1aee0">&#9670;&nbsp;</a></span>hasChunk()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">bool SnakerMap::hasChunk </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>cx</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>cy</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>判断chunk坐标有无已生成的chunk </p>
<p>避免访问空内存的唯一途径 </p>

</div>
</div>
<a id="acf96b3c728e180b51d5c635809d2a1fb"></a>
<h2 class="memtitle"><span class="permalink"><a href="#acf96b3c728e180b51d5c635809d2a1fb">&#9670;&nbsp;</a></span>ListFruit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">vector&lt; <a class="el" href="class_snaker_fruit.html">SnakerFruit</a> * &gt; SnakerMap::ListFruit </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="class_snaker_chunk.html">SnakerChunk</a> *&#160;</td>
          <td class="paramname"><em>chk</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>列出指定chunk中的所有水果 </p>
<dl class="section warning"><dt>Warning</dt><dd>已被取代，不再使用！ </dd></dl>

</div>
</div>
<a id="a0381749c300a65ecd5f405591bdea864"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0381749c300a65ecd5f405591bdea864">&#9670;&nbsp;</a></span>mapOrigin()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="class_snaker_chunk.html">SnakerChunk</a> * SnakerMap::mapOrigin </td>
          <td>(</td>
          <td class="paramname"></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>获得原点chunk </p>
<p>用于游戏初始化 </p>

</div>
</div>
<a id="ae97130f1e3f8548daafa02eba90e4a5b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ae97130f1e3f8548daafa02eba90e4a5b">&#9670;&nbsp;</a></span>RemoveFruit()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void SnakerMap::RemoveFruit </td>
          <td>(</td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>x</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>y</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>移除指定位置的水果 </p>
<dl class="section warning"><dt>Warning</dt><dd>不会判断指定位置是否为水果，需要在调用前自行判断 </dd></dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>src/include/<a class="el" href="_snaker_map_8h_source.html">SnakerMap.h</a></li>
<li>src/SnakerMap/SnakerMap.cpp</li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="class_snaker_map.html">SnakerMap</a></li>
    <li class="footer">Generated by <a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.1 </li>
  </ul>
</div>
</body>
</html>
